﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bll;
using Model;

namespace Myproject.BSM.PcWeb.PcChannel.Article
{
    public partial class ArticleEdit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string ArticleID = Request.QueryString["id"];
            string ParentID = Request.QueryString["pid"];
            if (!string.IsNullOrEmpty(ArticleID))
            {
                pc_Channel_ArticleEdit_WebArticleId.Value = ArticleID;
                ArticleModel model = new ArticleBLL().GetModel(int.Parse(ArticleID));
                pc_Channel_ArticleEdit_name.Value = model.ChanneTitle;
                pc_Channel_ArticleEdit_ename.Value = model.EChanneTitle;
                pc_Channel_ArticleEdit_url.Value = model.Url;
            }
            else
            {
                pc_Channel_ArticleEdit_parentID.Value = ParentID;
            }
        }
    }
}